
//Avoid console errors 
(function() {
    var method;
    var noop = function () {};
    var methods = [
        'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
        'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
        'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
        'timeStamp', 'trace', 'warn'
    ];
    var length = methods.length;
    var console = (window.console = window.console || {});

    while (length--) {
        method = methods[length];

        // Only stub undefined methods.
        if (!console[method]) {
            console[method] = noop;
        }
    }
}());



function isiPad() {
    return (navigator.platform.indexOf("iPad") !== -1);
}

function isiPhone() {
    return (navigator.platform.indexOf("iPhone") !== -1);
}
ipd = isiPad();
iph = isiPhone();

var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0));


var listCount = $('.bxslider li a').length;
for (var i = 0; i < listCount; i++) {
    var url = $('.bxslider li a:eq(' + i + ')').attr('href');
    $('.mansetController li a:eq(' + i + ')').attr('href', url);
};
if (isTouch) {
    $('.mansetController li a').on('click', function (e) {
        $(this).removeClass('active');
        if ($(this).hasClass('clicked')) {} else {
            $('.mansetController li a').removeClass('clicked');
            $(this).addClass('clicked');
            if (ipd == false && iph == false) {
                return false;
            }
        }
    })
}


function getCookie(c_name) {
    var i, x, y, ARRcookies = document.cookie.split(";");
    for (i = 0; i < ARRcookies.length; i++) {
        x = ARRcookies[i].substr(0, ARRcookies[i].indexOf("="));
        y = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1);
        x = x.replace(/^\s+|\s+$/g, "");
        if (x == c_name) {
            return unescape(y);
        }
    }
}

function setCookie(c_name, value, exdays) {
    var exdate = new Date();
    exdate.setDate(exdate.getDate() + exdays);
    var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString());
    document.cookie = c_name + "=" + c_value;
}



// URL Parser
	function parseURL(url) {
    var a =  document.createElement('a');
    a.href = url;
    return {
        source: url,
        protocol: a.protocol.replace(':',''),
        host: a.hostname,
        port: a.port,
        query: a.search,
        params: (function(){
            var ret = {},
                seg = a.search.replace(/^\?/,'').split('&'),
                len = seg.length, i = 0, s;
            for (;i<len;i++) {
                if (!seg[i]) { continue; }
                s = seg[i].split('=');
                ret[s[0]] = s[1];
            }
            return ret;
        })(),
        file: (a.pathname.match(/\/([^\/?#]+)$/i) || [,''])[1],
        hash: a.hash.replace('#',''),
        path: a.pathname.replace(/^([^\/])/,'/$1'),
        relative: (a.href.match(/tps?:\/\/[^\/]+(.+)/) || [,''])[1],
        segments: a.pathname.replace(/^\//,'').split('/')
    };
}





//Anasayfa Arama için

function reArrange(kelime) {
    return (kelime.replace(/ü/g, "%C3%BC").replace(/Ü/g, "%C3%9C").replace(/ş/g, "%C5%9F").replace(/Ş/g, "%C5%9E").replace(/ğ/g, "%C4%9F").replace(/Ğ/g, "%C4%9E").replace(/ç/g, "%C3%A7").replace(/Ç/g, "%C3%87").replace(/ı/g, "%C4%B1").replace(/İ/g, "%C4%B0").replace(/ö/g, "%C3%B6").replace(/Ö/g, "%C3%96").replace(/ /g, "%20"));
}

$("#keyword2").ready(function () {
    $("#aramaForm").submit(function () {
        $('#keyword').val(reArrange($('#keyword2').val()));
        if ($("#keyword2").val() == "Aranacak Kelime" || $("#keyword2").val() == "Aranacak Kelime Giriniz!" || $("#keyword2").val() == "") {
            $("#keyword2").val("Aranacak Kelime Giriniz!");
            return false;
        }
    });
    $("#keyword2").click(function () {
        if ($("#keyword2").val() == "Aranacak Kelime" || $("#keyword2").val() == "Aranacak Kelime Giriniz!") {
            $("#keyword2").val("");
        }
    });
    $("#keyword2").blur(function () {
        if ($("#keyword2").val() == "")
            $("#keyword2").val("Aranacak Kelime");
    });
});



$(function () {

    $(".sharePop").click(function () {
        if ($(this).attr('id') == "emailFromTop") {
            $("#popDiv").appendTo(".epostaGonder");
            $(".altOk").css("display", "none");
            if ($('#popDiv').find('div.ustOkPop').length) {
                $(".ustOkPop").css("display", "block");
            } else {
                $("<div class=ustOkPop>").appendTo("#popDiv");
            }
        } else {
            $("#popDiv").appendTo(".arsivEkle");
            $(".ustOkPop").css("display", "none");
            $(".altOk").css("display", "block");
        }
        //alert($(this).attr("href") + " / " + $(this).attr("pw") + " / " + $(this).attr("ph"))
        var leftPos = parseInt($(this).attr("lpos"));
        var topPos = parseInt($(this).attr("tpos"));
        var inHeight = parseInt($(this).attr("ph"));
        var mainHeight = inHeight + 20;
        var inWidth = parseInt($(this).attr("pw"));
        var mainWidth = inWidth + 20;
        $("#popDiv").css({
            width: inWidth + "px",
            height: inHeight + "px",
            left: leftPos + "px",
            top: topPos + "px"
        });
        //$(".popKenar").css({height:inHeight+"px"});
        //$(".midFullBorder").css({width:inWidth+"px"});
        $(".popFull").css({
            width: inWidth + "px",
            height: inHeight + "px"
        });
        $(".kapatBut").css({
            left: (mainWidth - 33) + "px"
        });
        $(".altOk").css({
            left: ((mainWidth / 2) + 70) + "px"
        });
        $(".popFull").html("");
        $("<iframe scrolling=\"no\" frameborder=\"0\" style=\"border: medium none; overflow: hidden; width: " + inWidth + "px; height: " + inHeight + "px;\" src=\"" + $(this).attr("href") + "\"></iframe>").appendTo($(".popFull"));
        $("#popDiv").show();
        return false;
    });
    $(".kapatBut").click(function () {
        $("#popDiv").hide();
    });
});

document.body.onmousedown = function () {
    $("#popDiv").hide();
}

//Dinamik css yükleme
 function loadCSS(href) {
     var cssLink = $("<link rel='stylesheet' type='text/css' href='"+href+"'>");
     $("head").append(cssLink); 
 };

//Document.ready başlangıç

$(document).ready(function () {


	 window.setTimeout(function () {
        $('#ascrail2000').addClass('showBar');
    }, 3000);



// Ara Menü Aktif Class atama
var activePath = parseURL(document.location);

if($('.midMenuCont ').length>0){
var secondPath=activePath.segments[1];

//Ekonomi için Aktif Class
if(secondPath=="enerji"){$('li.enerji a').addClass('active');}
if(secondPath=="emlak"){$('li.emlak a').addClass('active');}
if(secondPath=="oto"){$('li.oto a').addClass('active');}
if(secondPath=="tarim"){$('li.tarim a').addClass('active');}

//Spor için Aktif Class
if(secondPath=="futbol"){$('li.futbol a').addClass('active');}
if(secondPath=="basketbol"){$('li.basketbol a').addClass('active');}
if(secondPath=="diger"){$('li.diger a').addClass('active');}
if(secondPath=="yazarlar"){$('li.yazarlar a').addClass('active');}
if(secondPath=="yazarlar"){$('<div style="height:5px;"></div>').insertBefore('.midLeft');}


//Kelebek için Aktif Class
if(secondPath=="televizyon"){$('li.televizyon a').addClass('active');}

//Kültür Sanat için Aktif Class
if(secondPath=="kitap-cd"){$('li.kitap-cd a').addClass('active');}

}


 if($.browser.msie===true && $.browser.version<9 && $(window).width()<=1024){
loadCSS('http://www.hurriyet.com.tr/_css/hurriyet-2013/ie.css');
}







//Anasayfa manşet slider string işlemleri

if($('.mansetSlider')){


//Manşet title 40 karakterden fazla ise 40'ta sınırla
$( ".mansetTitle a" ).each(function( index ) {
var titleStr=$(this).text();
var charCount= $( this ).text().length;
if(charCount>42)
{
var modText = titleStr.substring(0,42);
$(this).text(modText);
}
});



// Manşette patlangaç girilmemiş ise patlangaç alanını gizle.
var mTitleCount=$('.mansetTopTitle a').length;
for (i=0;i<=mTitleCount;i++){
var mtxt=$('.mansetTopTitle a:eq('+i+')').text();

if($.trim(mtxt).length==0){
$('.mansetTopTitle:eq('+i+')').hide();
}
}
}


    // Comment button page scroll
    $("#commentBtn").on("click", function (e) {

        e.preventDefault();

        var ds = $(".comments").offset().top;
        ds = ds + 10;
        $('html,body').animate({
            scrollTop: ds
        },
            'slow');

    });

    /*text resize*/
    // Reset Font Size
    var originalFontSize = $('.detailText p').css('font-size');
    $(".resetFont").click(function () {
     
        $('.detailText p').css({
            'font-size': originalFontSize,
            'line-height': '24px'

        });
        return false;
    });

    // Increase Font Size
    $(".incFont").click(function () {
      
        var currentFontSize = $('.detailText p').css('font-size');
        var currentFontSizeNum = parseFloat(currentFontSize, 10);
        var newFontSize = currentFontSizeNum * 1.2;

        if (newFontSize < 24) {
            $('.detailText p').css({
                'font-size': newFontSize,
                'line-height': newFontSize + (newFontSize / 2) + 'px'

            });
        }
        return false;
    });
    // Decrease Font Size
    $(".decFont").click(function () {
        var currentFontSize = $('.detailText p').css('font-size');
        var currentFontSizeNum = parseFloat(currentFontSize, 10);
        var newFontSize = currentFontSizeNum * 0.8;

        if (newFontSize > 8) {
            $('.detailText p').css({
                'font-size': newFontSize,
                'line-height': newFontSize + (newFontSize / 2) + 'px'
            });
        }
        return false;
    });

	//Magazin televizyon link binder

for (i=1;i<=$('.manset_gorsel').length;i++){
var inrex=i-1;
$('.manset_buton:eq('+inrex+') a').attr('href',$('#tvmanset'+i+' a').attr('href'));
}



    //  $('.mainHeader .subMenuCont').css('display', 'block');
    // Listelerdeki Margin'lerin temizlenmesi
    $(".boxH255:last-child").css("margin", 0);
    $(".boxH200:last-child,.topLinks li:last-child").css("margin-right", 0);
    $(".promoBox .boxH194:last-child").css("margin-bottom", 0);
     //$(".promoBoxCategory .boxH194:nth-child(3n)").css("margin-bottom", 0);
	  $(".dunyaYazarlar .boxH194:nth-child(3n)").css("margin-right", 0);
 


    $(".widgetList li:last-child").css("border-bottom", 0);
    $(".jobList li:last-child").css("border-bottom", 0);
    $(".linkNewsList li:last-child").css("border-bottom", 0);
    $('.detailText p strong').parent('p').css('margin-bottom', '5px');


	
	if($('.mseyahat').length>0)
	{
	$('a span.newsTitle').css('font-size','14px');
	}

    // Menü Fonksiyonları

    function menuEvent(th) {
        $('.menu li a').removeClass('active');
        $(th).addClass('active');

        var cl = $(th).parent('li').attr('class');
        var color = $(th).css('background-color');
        $('.menu').removeClass('mShadow').css('border-bottom', '2px solid ' + color);




    }


    function menuClear() {

        $('.menu').css('border-bottom', '2px solid #efefef').addClass('mShadow');
        $('.menu li a').removeClass('active');
    }


    $('.hurUserContainer').on('hover', function () {
        $('.userSubMenu').slideToggle('fast');
    });


    $('.menu li a').on('click', function () {
        menuEvent(this);
    });



    $('.menu li a').on({
        mouseenter: function () {
            var pli = $(this).parent('li').attr('class');

            if (pli !== 'menuDiger') {
                menuEvent(this);
            }
        },
        mouseleave: function () {

            var pli = $(this).parent('li').attr('class');

            if (pli !== 'menuDiger') {
                menuClear();
            }
        }
    });


    //Diğer menüsü aç kapa işlemleri
    $('.mainMenu li.menuDiger a').on({
        click: function () {
            menuEvent(this);
            var sbm = $('.subMenuCont').css('display');

            if (sbm === 'block') {
                menuClear();
            } else {
                //window.setTimeout(subMenuClose, 10000);
            }
            $('.subMenuCont').slideToggle();

			return false;
        }
    });

    function subMenuClose() {
        $('.subMenuCont').slideUp();
        menuClear();
    };


    //Son Dakika kutusu animasyon

    window.setTimeout(function () {
        $('.sonDakikaBar').show().addClass('flash animated');
    }, 2000);
	
	

	


    //Hava Durumu Kutusu aç-kapa

    $('.cityChooseLink').on('click', function () {
        $('.weatherPopup').slideToggle();

    });





    //TABS Viplay aile vs
    $(".tabsIcerik .tab_content").hide();
	
    $(".tabsIcerik .tab_content:first").show();
	 $("ul.groupTabsTitles li a:first").addClass("active");
	
    $("ul.groupTabsTitles li a").click(function () {
        $("ul.groupTabsTitles li a").removeClass("active");
        $(this).addClass("active");
        $(".tabsIcerik .tab_content").hide();
        var activeTab = $(this).attr("rel");
        $(".tabsIcerik #" + activeTab).fadeIn();
        return false;
    });


    //TABS Emlak, yenibiriş vs
	$("#tabsEticaret .tab_content:first").show();
	 $("ul.groupTabsTitlesTicaret li a:first").addClass("active");
    $("ul.groupTabsTitlesTicaret li a ").click(function () {
        $("ul.groupTabsTitlesTicaret li a ").removeClass("active");
        $(this).addClass("active");
        $("#tabsEticaret .tab_content").hide();
        var activeTab = $(this).attr("rel");
        $("#tabsEticaret #" + activeTab).fadeIn();
        return false;
    });



    $('.yzrDiger').hide();
    $('.singleYazarBox').hover(function () {

        $(this).children('.gztLogo').hide();
        $(this).children('.yzrDiger').fadeIn();
        $(this).addClass('yzrShadow');
    }, function () {
        $('.yzrDiger').hide();
        $(this).children('.gztLogo').fadeIn();
        $(this).removeClass('yzrShadow');
    });



    //Tüm bx-slider'lar



/*
    var topChannels = $('.otherChannels').bxSlider({
        minSlides: 2,
        slideWidth: 380,
        slideMargin: 10,
        pause: 5000,
        mode: 'fade',
        auto: true,
        infiniteLoop: true,
        controls: false,
        pager: false
    });
	*/

	if($('.brcSldr').length>0){
    var burcSlider = $('.brcSldr').bxSlider({
        touchEnabled: true,
        oneToOneTouch: true,
        pause: 2000,
        controls: true
    });
    }
    /*
        $(".burcSlider img.lazy").lazyload({ 
                event : "click"
            });                 

    
    $('.burcSlider .bx-prev, .burcSlider .bx-next').on('click',Function(){
    $('.burcSlider img.lazy').trigger('click');        
    });
*/


if($('.mansetSlider').length>0){
    var sliderHome = $('.mansetSlider').bxSlider({
        pagerCustom: '#sliderPager',
        touchEnabled: true,
        oneToOneTouch: true,
        mode: 'fade',
        controls: true,
        speed: 50,
        pause: 2000,
		responsive:false,
		preloadImages:'visible',
		adaptiveHeight:false,
		useCSS:false
    });
	}


if($('.categoryManset').length>0){
    var sliderCat = $('.categoryManset .mansetSlider').bxSlider({
        pagerCustom: '#catSliderPager',
        touchEnabled: true,
        oneToOneTouch: true,
        mode: 'fade',
        controls: false,
        speed: 50,
        pause: 2000
    });
}


if($('.flashOne').length>0){

    var sliderFlash = $('.flashOne .flashSlider').bxSlider({
		pagerCustom: '#flashSliderPager',
        touchEnabled: true,
        oneToOneTouch: true,
        mode: 'fade',
        controls: true,
        speed: 50,
        pause: 5000,
		autoDelay:2000,
		autoHover:true,
		auto:true
		
    });
}


if($('.altMansetSlider').length>0){
    var sliderAltManset = $('.mag .altMansetSlider').bxSlider({
	pagerCustom: '#catSliderPagerMagazin',
        touchEnabled: true,
        oneToOneTouch: true,
        mode: 'fade',
        controls: true,
        speed: 50,
        pause: 2000,
        onSliderLoad: function () {},
        onSlideAfter: function () {
            changeSliderControlImages('mag');
        }
    });
	}

	if($('.altMansetSlider').length>0){
    var sliderTvManset = $('.webTv .altMansetSlider').bxSlider({
        touchEnabled: true,
        oneToOneTouch: true,
        mode: 'fade',
        controls: true,
        speed: 50,
        pause: 2000,
        onSliderLoad: function () {},
        onSlideAfter: function () {

            changeSliderControlImages('webTv');
        }
    });
	}


    //var sliderType;
    //changeSliderControlImages(sliderType);



    // Alt manşet ve webtv slider'lar için sağ sol image change fonksiyonu

    function changeSliderControlImages(sliderType) {


        if (sliderType === 'mag') {

            var currentSlide = sliderAltManset.getCurrentSlide();
			 
			currentSlide=currentSlide*1;
			
           var  slideCount = sliderAltManset.getSlideCount();

            var lastSlideIndex = slideCount - 1;
		
        }

        if (sliderType === 'webTv') {

            var currentSlide = sliderTvManset.getCurrentSlide();
            slideCount = sliderTvManset.getSlideCount();
            lastSlideIndex = slideCount - 1;
        }


        if (currentSlide == 0) {
            lSlide = lastSlideIndex;
		
            rSlide = currentSlide + 1;
				
        } else  if (currentSlide == lastSlideIndex) {
                lSlide = currentSlide - 1;
                rSlide = 0
            } else {
                lSlide = currentSlide - 1;
                rSlide = currentSlide + 1;
            }
		

        if (sliderType === 'mag') {

            var lPath = $('.mag .altMansetSlider li:eq(' + lSlide + ') img').attr('src');
            var rPath = $('.mag .altMansetSlider li:eq(' + rSlide + ') img').attr('src');
            $('.mag .lftNav img').attr('src', lPath);
            $('.mag .rgtNav img').attr('src', rPath);
        }

        if (sliderType === 'webTv') {


            var lPath = $('.webTv .altMansetSlider li:eq(' + lSlide + ') img').attr('src');
            var rPath = $('.webTv .altMansetSlider li:eq(' + rSlide + ') img').attr('src');
            $('.webTv .lftNav img').attr('src', lPath);
            $('.webTv .rgtNav img').attr('src', rPath);
        }

    }



	
	
	if(activePath.host=='sample.hurriyet.com.tr' || activePath.host=='test.hurriyet.com.tr' || activePath.host=='www.hurriyet.com.tr'){

    var slider1 = $('.mainCatSlider1').bxSlider({
        pagerCustom: '#catSliderControls1',
        touchEnabled: true,
        oneToOneTouch: true,
        controls: false,
        pause: 2000
    });

    var slider2 = $('.mainCatSlider2').bxSlider({
        pagerCustom: '#catSliderControls2',
        touchEnabled: true,
        oneToOneTouch: true,
        controls: false,
        pause: 2000
    });

    var slider3 = $('.mainCatSlider3').bxSlider({
        pagerCustom: '#catSliderControls3',
        touchEnabled: true,
        oneToOneTouch: true,
        controls: false,
        pause: 2000
    });

    var slider4 = $('.mainCatSlider4').bxSlider({
        pagerCustom: '#catSliderControls4',
        touchEnabled: true,
        oneToOneTouch: true,
        controls: false,
        pause: 2000
    });
    var slider5 = $('.mainCatSlider5').bxSlider({
        pagerCustom: '#catSliderControls5',
        touchEnabled: true,
        oneToOneTouch: true,
        controls: false,
        pause: 2000
    });
    var slider6 = $('.mainCatSlider6').bxSlider({
        pagerCustom: '#catSliderControls6',
        touchEnabled: true,
        oneToOneTouch: true,
        controls: false,
        pause: 2000
    });
    var slider7 = $('.mainCatSlider7').bxSlider({
        pagerCustom: '#catSliderControls7',
        touchEnabled: true,
        oneToOneTouch: true,
        controls: false,
        pause: 2000
    });
    var slider8 = $('.mainCatSlider8').bxSlider({
        pagerCustom: '#catSliderControls8',
        touchEnabled: true,
        oneToOneTouch: true,
        controls: false,
        pause: 2000
    });
}


    /*
    $('.flashOne').hover(function () {
        $('.flashOne .bx-controls-direction').show();
    }, function () {
        // mouseout actions
        $('.flashOne .bx-controls-direction').hide();
    });
*/

    $('#flashPager a').hover(function () {
        var index = $(this).attr('data-slide-index');
        sliderFlash.goToSlide(index);
    }, function () {
        // mouseout actions
    });

	
	  $('#flashSliderPager a').hover(function () {
        var index = $(this).attr('data-slide-index');
		 $('#flashSliderPager a').removeClass('active');
		$(this).addClass('active');
        sliderFlash.goToSlide(index);
    }, function () {
        // mouseout actions
    });
	
	
	


    $('#sliderPager a').hover(function () {
        var index = $(this).attr('data-slide-index');
        sliderHome.goToSlide(index);
    }, function () {
        // mouseout actions
    });

    $('#catSliderPager a').hover(function () {
        var index = $(this).attr('data-slide-index');
        sliderCat.goToSlide(index);
    }, function () {
        // mouseout actions
    });
	
	$('#catSliderPagerMagazin a').hover(function () {
        var index = $(this).attr('data-slide-index');
        sliderAltManset.goToSlide(index);
    }, function () {
        // mouseout actions
    });




    $('#catSliderControls1 a').hover(function () {
        var index = $(this).attr('data-slide-index');
        slider1.goToSlide(index);
    }, function () {
        // mouseout actions
    });


    $('#catSliderControls2 a').hover(function () {
        var index = $(this).attr('data-slide-index');
        slider2.goToSlide(index);
    }, function () {
        // mouseout actions
    });

    $('#catSliderControls3 a').hover(function () {
        var index = $(this).attr('data-slide-index');
        slider3.goToSlide(index);
    }, function () {
        // mouseout actions
    });

    $('#catSliderControls4 a').hover(function () {
        var index = $(this).attr('data-slide-index');
        slider4.goToSlide(index);
    }, function () {
        // mouseout actions
    });

    $('#catSliderControls5 a').hover(function () {
        var index = $(this).attr('data-slide-index');
        slider5.goToSlide(index);
    }, function () {
        // mouseout actions
    });
    $('#catSliderControls6 a').hover(function () {
        var index = $(this).attr('data-slide-index');
        slider6.goToSlide(index);
    }, function () {
        // mouseout actions
    });

    $('#catSliderControls7 a').hover(function () {
        var index = $(this).attr('data-slide-index');
        slider7.goToSlide(index);
    }, function () {
        // mouseout actions
    });

    $('#catSliderControls8 a').hover(function () {
        var index = $(this).attr('data-slide-index');
        slider8.goToSlide(index);
    }, function () {
        // mouseout actions
    });



    if ($('.otherNewsContainer').length > 0) {
        linkNewsListClear();
    }


    function linkNewsListClear() {
        var liCount = $('.otherNewsContainer .linkNewsList li').length;
        var cSay = liCount - 2;
        $('.otherNewsContainer .linkNewsList li:eq(' + cSay + ')').css('border-bottom', '0px');
        for (i = 0; i <= liCount - 1; i++) {
            var t = $('.otherNewsContainer .linkNewsList li:eq(' + i + ') a').text();

            t = $.trim(t);
            if (t.length > 35) {
                $('.otherNewsContainer .linkNewsList li:eq(' + i + ') a').text(t.substr(0, 35) + '...');
            }
        }
        var liText = $('.otherNewsContainer .linkNewsList .secondLi:last-child').text();
        var trimmedText = $.trim(liText);
        if (trimmedText === "") {
            $('.otherNewsContainer .linkNewsList .secondLi:last-child').remove();
        }


    }


    /*    
	
	  if(trimmedText.length>40)
  {
  console.log('text:'+trimmedText.substr(0, 40)+'...');
  }
  else
  {
  console.log('text:'+trimmedText);
  }
	
	
	
	
	
      $('.catSliderControls li a').hover(function () {
        var index = $(this).attr('data-slide-index');
          var str=$(this).parent('li').parent('ul').attr('id');
          
          var lastChar=str.charAt(str.length-1);
          
       var sliderId='slider'+lastChar;
   
      sliderId.goToSlide(index);
    }, function () {
        // mouseout actions
    });
*/


    $('.formArea textarea').autoResize();



    // Slider'lar için linkleri pager'lara ekleme fonksiyonları
    //type 1 = Anasayfa pager li kullanılan yapı için
    //type 2 = category manşet pager yapısı div içinde direk a kullanılan yapı için

    if ($('.manset')) {
        sliderLinkBinder('.mansetSlider li', '#sliderPager li', 1);
    }

    if ($('.categoryManset')) {
        sliderLinkBinder('.categoryManset .mansetSlider li', '#catSliderPager', 2);
    }
	
	
    if ($('.flashOne')) {
        sliderLinkBinder('.flashSlider li', '#flashSliderPager', 2);
    }
	
	
		 if ($('.mag')) {
        sliderLinkBinder('.mag .altMansetSlider  li', '#catSliderPagerMagazin', 2);
    }
	
	

    function sliderLinkBinder(slider, pager, type) {
        var uz = $(slider).length;
        for (i = 0; i < uz; i++) {
            var lik = $(slider + ':eq(' + i + ') a').attr('href');
			
			//Anasayfa manşet ise
            if (type === 1) {
                $(pager + ':eq(' + i + ') a').attr('href', lik);

                $(pager + ':eq(' + i + ') a').bind("click", function (e) {
                    // window.location = ($(this).attr('href'));
					  
					  //Mouse scroll click ise 2 tane tab açmasını engelliyoruz
					  if (e.which === 2) e.preventDefault();
                    window.open($(this).attr('href'), '_blank');
                });
            }

				// Kategori Manşet ise
            if (type === 2) {
                $(pager + ' a:eq(' + i + ')').attr('href', lik);
                $(pager + ' a:eq(' + i + ')').bind("click", function (e) {
                    // window.location = ($(this).attr('href'));
					  //Mouse scroll click ise 2 tane tab açmasını engelliyoruz
					  if (e.which === 2) e.preventDefault();
                    window.open($(this).attr('href'), '_blank');
                });
            }
        }
    }
});

//Document.ready bitiş



/*
 * jQuery autoResize (textarea auto-resizer)
 * @copyright James Padolsey http://james.padolsey.com
 * @version 1.04
 */

(function ($) {

    $.fn.autoResize = function (options) {

        // Just some abstracted details,
        // to make plugin users happy:
        var settings = $.extend({
            onResize: function () {},
            animate: true,
            animateDuration: 150,
            animateCallback: function () {},
            extraSpace: 20,
            limit: 1000
        }, options);

        // Only textarea's auto-resize:
        this.filter('textarea').each(function () {

            // Get rid of scrollbars and disable WebKit resizing:
            var textarea = $(this).css({
                resize: 'none',
                'overflow-y': 'hidden'
            }),

                // Cache original height, for use later:
                origHeight = textarea.height(),

                // Need clone of textarea, hidden off screen:
                clone = (function () {

                    // Properties which may effect space taken up by chracters:
                    var props = ['height', 'width', 'lineHeight', 'textDecoration', 'letterSpacing'],
                        propOb = {};

                    // Create object of styles to apply:
                    $.each(props, function (i, prop) {
                        propOb[prop] = textarea.css(prop);
                    });

                    // Clone the actual textarea removing unique properties
                    // and insert before original textarea:
                    return textarea.clone().removeAttr('id').removeAttr('name').css({
                        position: 'absolute',
                        top: 0,
                        left: -9999
                    }).css(propOb).attr('tabIndex', '-1').insertBefore(textarea);

                })(),
                lastScrollTop = null,
                updateSize = function () {

                    // Prepare the clone:
                    clone.height(0).val($(this).val()).scrollTop(10000);

                    // Find the height of text:
                    var scrollTop = Math.max(clone.scrollTop(), origHeight) + settings.extraSpace,
                        toChange = $(this).add(clone);

                    // Don't do anything if scrollTip hasen't changed:
                    if (lastScrollTop === scrollTop) {
                        return;
                    }
                    lastScrollTop = scrollTop;

                    // Check for limit:
                    if (scrollTop >= settings.limit) {
                        $(this).css('overflow-y', '');
                        return;
                    }
                    // Fire off callback:
                    settings.onResize.call(this);

                    // Either animate or directly apply height:
                    settings.animate && textarea.css('display') === 'block' ?
                        toChange.stop().animate({
                        height: scrollTop
                    }, settings.animateDuration, settings.animateCallback) : toChange.height(scrollTop);
                };

            // Bind namespaced handlers to appropriate events:
            textarea
                .unbind('.dynSiz')
                .bind('keyup.dynSiz', updateSize)
                .bind('keydown.dynSiz', updateSize)
                .bind('change.dynSiz', updateSize);

        });

        // Chain:
        return this;

    };





})(jQuery);


/*
 * Lazy Load - jQuery plugin for lazy loading images
 *
 * Copyright (c) 2007-2013 Mika Tuupola
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Project home:
 *   http://www.appelsiini.net/projects/lazyload
 *
 * Version: 1.9.0
 *
 */
!function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function g(){var b=0;i.each(function(){var c=a(this);if(!j.skip_invisible||c.is(":visible"))if(a.abovethetop(this,j)||a.leftofbegin(this,j));else if(a.belowthefold(this,j)||a.rightoffold(this,j)){if(++b>j.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,i=this,j={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:""};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(j,f)),h=j.container===d||j.container===b?e:a(j.container),0===j.event.indexOf("scroll")&&h.bind(j.event,function(){return g()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,(c.attr("src")===d||c.attr("src")===!1)&&c.attr("src",j.placeholder),c.one("appear",function(){if(!this.loaded){if(j.appear){var d=i.length;j.appear.call(b,d,j)}a("<img />").bind("load",function(){var d=c.data(j.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[j.effect](j.effect_speed),b.loaded=!0;var e=a.grep(i,function(a){return!a.loaded});if(i=a(e),j.load){var f=i.length;j.load.call(b,f,j)}}).attr("src",c.data(j.data_attribute))}}),0!==j.event.indexOf("scroll")&&c.bind(j.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){g()}),/iphone|ipod|ipad.*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&i.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){g()}),this},a.belowthefold=function(c,f){var g;return g=f.container===d||f.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollLeft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollTop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollLeft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document);




/*! Hammer.JS - v1.0.5 - 2013-04-07
 * http://eightmedia.github.com/hammer.js
 *
 * Copyright (c) 2013 Jorik Tangelder <j.tangelder@gmail.com>;
 * Licensed under the MIT license */

(function(t,e){"use strict";function n(){if(!i.READY){i.event.determineEventTypes();for(var t in i.gestures)i.gestures.hasOwnProperty(t)&&i.detection.register(i.gestures[t]);i.event.onTouch(i.DOCUMENT,i.EVENT_MOVE,i.detection.detect),i.event.onTouch(i.DOCUMENT,i.EVENT_END,i.detection.detect),i.READY=!0}}var i=function(t,e){return new i.Instance(t,e||{})};i.defaults={stop_browser_behavior:{userSelect:"none",touchAction:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},i.HAS_POINTEREVENTS=navigator.pointerEnabled||navigator.msPointerEnabled,i.HAS_TOUCHEVENTS="ontouchstart"in t,i.MOBILE_REGEX=/mobile|tablet|ip(ad|hone|od)|android/i,i.NO_MOUSEEVENTS=i.HAS_TOUCHEVENTS&&navigator.userAgent.match(i.MOBILE_REGEX),i.EVENT_TYPES={},i.DIRECTION_DOWN="down",i.DIRECTION_LEFT="left",i.DIRECTION_UP="up",i.DIRECTION_RIGHT="right",i.POINTER_MOUSE="mouse",i.POINTER_TOUCH="touch",i.POINTER_PEN="pen",i.EVENT_START="start",i.EVENT_MOVE="move",i.EVENT_END="end",i.DOCUMENT=document,i.plugins={},i.READY=!1,i.Instance=function(t,e){var r=this;return n(),this.element=t,this.enabled=!0,this.options=i.utils.extend(i.utils.extend({},i.defaults),e||{}),this.options.stop_browser_behavior&&i.utils.stopDefaultBrowserBehavior(this.element,this.options.stop_browser_behavior),i.event.onTouch(t,i.EVENT_START,function(t){r.enabled&&i.detection.startDetect(r,t)}),this},i.Instance.prototype={on:function(t,e){for(var n=t.split(" "),i=0;n.length>i;i++)this.element.addEventListener(n[i],e,!1);return this},off:function(t,e){for(var n=t.split(" "),i=0;n.length>i;i++)this.element.removeEventListener(n[i],e,!1);return this},trigger:function(t,e){var n=i.DOCUMENT.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e;var r=this.element;return i.utils.hasParent(e.target,r)&&(r=e.target),r.dispatchEvent(n),this},enable:function(t){return this.enabled=t,this}};var r=null,o=!1,s=!1;i.event={bindDom:function(t,e,n){for(var i=e.split(" "),r=0;i.length>r;r++)t.addEventListener(i[r],n,!1)},onTouch:function(t,e,n){var a=this;this.bindDom(t,i.EVENT_TYPES[e],function(c){var u=c.type.toLowerCase();if(!u.match(/mouse/)||!s){(u.match(/touch/)||u.match(/pointerdown/)||u.match(/mouse/)&&1===c.which)&&(o=!0),u.match(/touch|pointer/)&&(s=!0);var h=0;o&&(i.HAS_POINTEREVENTS&&e!=i.EVENT_END?h=i.PointerEvent.updatePointer(e,c):u.match(/touch/)?h=c.touches.length:s||(h=u.match(/up/)?0:1),h>0&&e==i.EVENT_END?e=i.EVENT_MOVE:h||(e=i.EVENT_END),h||null===r?r=c:c=r,n.call(i.detection,a.collectEventData(t,e,c)),i.HAS_POINTEREVENTS&&e==i.EVENT_END&&(h=i.PointerEvent.updatePointer(e,c))),h||(r=null,o=!1,s=!1,i.PointerEvent.reset())}})},determineEventTypes:function(){var t;t=i.HAS_POINTEREVENTS?i.PointerEvent.getEvents():i.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],i.EVENT_TYPES[i.EVENT_START]=t[0],i.EVENT_TYPES[i.EVENT_MOVE]=t[1],i.EVENT_TYPES[i.EVENT_END]=t[2]},getTouchList:function(t){return i.HAS_POINTEREVENTS?i.PointerEvent.getTouchList():t.touches?t.touches:[{identifier:1,pageX:t.pageX,pageY:t.pageY,target:t.target}]},collectEventData:function(t,e,n){var r=this.getTouchList(n,e),o=i.POINTER_TOUCH;return(n.type.match(/mouse/)||i.PointerEvent.matchType(i.POINTER_MOUSE,n))&&(o=i.POINTER_MOUSE),{center:i.utils.getCenter(r),timeStamp:(new Date).getTime(),target:n.target,touches:r,eventType:e,pointerType:o,srcEvent:n,preventDefault:function(){this.srcEvent.preventManipulation&&this.srcEvent.preventManipulation(),this.srcEvent.preventDefault&&this.srcEvent.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return i.detection.stopDetect()}}}},i.PointerEvent={pointers:{},getTouchList:function(){var t=this,e=[];return Object.keys(t.pointers).sort().forEach(function(n){e.push(t.pointers[n])}),e},updatePointer:function(t,e){return t==i.EVENT_END?this.pointers={}:(e.identifier=e.pointerId,this.pointers[e.pointerId]=e),Object.keys(this.pointers).length},matchType:function(t,e){if(!e.pointerType)return!1;var n={};return n[i.POINTER_MOUSE]=e.pointerType==e.MSPOINTER_TYPE_MOUSE||e.pointerType==i.POINTER_MOUSE,n[i.POINTER_TOUCH]=e.pointerType==e.MSPOINTER_TYPE_TOUCH||e.pointerType==i.POINTER_TOUCH,n[i.POINTER_PEN]=e.pointerType==e.MSPOINTER_TYPE_PEN||e.pointerType==i.POINTER_PEN,n[t]},getEvents:function(){return["pointerdown MSPointerDown","pointermove MSPointerMove","pointerup pointercancel MSPointerUp MSPointerCancel"]},reset:function(){this.pointers={}}},i.utils={extend:function(t,n,i){for(var r in n)t[r]!==e&&i||(t[r]=n[r]);return t},hasParent:function(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1},getCenter:function(t){for(var e=[],n=[],i=0,r=t.length;r>i;i++)e.push(t[i].pageX),n.push(t[i].pageY);return{pageX:(Math.min.apply(Math,e)+Math.max.apply(Math,e))/2,pageY:(Math.min.apply(Math,n)+Math.max.apply(Math,n))/2}},getVelocity:function(t,e,n){return{x:Math.abs(e/t)||0,y:Math.abs(n/t)||0}},getAngle:function(t,e){var n=e.pageY-t.pageY,i=e.pageX-t.pageX;return 180*Math.atan2(n,i)/Math.PI},getDirection:function(t,e){var n=Math.abs(t.pageX-e.pageX),r=Math.abs(t.pageY-e.pageY);return n>=r?t.pageX-e.pageX>0?i.DIRECTION_LEFT:i.DIRECTION_RIGHT:t.pageY-e.pageY>0?i.DIRECTION_UP:i.DIRECTION_DOWN},getDistance:function(t,e){var n=e.pageX-t.pageX,i=e.pageY-t.pageY;return Math.sqrt(n*n+i*i)},getScale:function(t,e){return t.length>=2&&e.length>=2?this.getDistance(e[0],e[1])/this.getDistance(t[0],t[1]):1},getRotation:function(t,e){return t.length>=2&&e.length>=2?this.getAngle(e[1],e[0])-this.getAngle(t[1],t[0]):0},isVertical:function(t){return t==i.DIRECTION_UP||t==i.DIRECTION_DOWN},stopDefaultBrowserBehavior:function(t,e){var n,i=["webkit","khtml","moz","ms","o",""];if(e&&t.style){for(var r=0;i.length>r;r++)for(var o in e)e.hasOwnProperty(o)&&(n=o,i[r]&&(n=i[r]+n.substring(0,1).toUpperCase()+n.substring(1)),t.style[n]=e[o]);"none"==e.userSelect&&(t.onselectstart=function(){return!1})}}},i.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(t,e){this.current||(this.stopped=!1,this.current={inst:t,startEvent:i.utils.extend({},e),lastEvent:!1,name:""},this.detect(e))},detect:function(t){if(this.current&&!this.stopped){t=this.extendEventData(t);for(var e=this.current.inst.options,n=0,r=this.gestures.length;r>n;n++){var o=this.gestures[n];if(!this.stopped&&e[o.name]!==!1&&o.handler.call(o,t,this.current.inst)===!1){this.stopDetect();break}}return this.current&&(this.current.lastEvent=t),t.eventType==i.EVENT_END&&!t.touches.length-1&&this.stopDetect(),t}},stopDetect:function(){this.previous=i.utils.extend({},this.current),this.current=null,this.stopped=!0},extendEventData:function(t){var e=this.current.startEvent;if(e&&(t.touches.length!=e.touches.length||t.touches===e.touches)){e.touches=[];for(var n=0,r=t.touches.length;r>n;n++)e.touches.push(i.utils.extend({},t.touches[n]))}var o=t.timeStamp-e.timeStamp,s=t.center.pageX-e.center.pageX,a=t.center.pageY-e.center.pageY,c=i.utils.getVelocity(o,s,a);return i.utils.extend(t,{deltaTime:o,deltaX:s,deltaY:a,velocityX:c.x,velocityY:c.y,distance:i.utils.getDistance(e.center,t.center),angle:i.utils.getAngle(e.center,t.center),direction:i.utils.getDirection(e.center,t.center),scale:i.utils.getScale(e.touches,t.touches),rotation:i.utils.getRotation(e.touches,t.touches),startEvent:e}),t},register:function(t){var n=t.defaults||{};return n[t.name]===e&&(n[t.name]=!0),i.utils.extend(i.defaults,n,!0),t.index=t.index||1e3,this.gestures.push(t),this.gestures.sort(function(t,e){return t.index<e.index?-1:t.index>e.index?1:0}),this.gestures}},i.gestures=i.gestures||{},i.gestures.Hold={name:"hold",index:10,defaults:{hold_timeout:500,hold_threshold:1},timer:null,handler:function(t,e){switch(t.eventType){case i.EVENT_START:clearTimeout(this.timer),i.detection.current.name=this.name,this.timer=setTimeout(function(){"hold"==i.detection.current.name&&e.trigger("hold",t)},e.options.hold_timeout);break;case i.EVENT_MOVE:t.distance>e.options.hold_threshold&&clearTimeout(this.timer);break;case i.EVENT_END:clearTimeout(this.timer)}}},i.gestures.Tap={name:"tap",index:100,defaults:{tap_max_touchtime:250,tap_max_distance:10,tap_always:!0,doubletap_distance:20,doubletap_interval:300},handler:function(t,e){if(t.eventType==i.EVENT_END){var n=i.detection.previous,r=!1;if(t.deltaTime>e.options.tap_max_touchtime||t.distance>e.options.tap_max_distance)return;n&&"tap"==n.name&&t.timeStamp-n.lastEvent.timeStamp<e.options.doubletap_interval&&t.distance<e.options.doubletap_distance&&(e.trigger("doubletap",t),r=!0),(!r||e.options.tap_always)&&(i.detection.current.name="tap",e.trigger(i.detection.current.name,t))}}},i.gestures.Swipe={name:"swipe",index:40,defaults:{swipe_max_touches:1,swipe_velocity:.7},handler:function(t,e){if(t.eventType==i.EVENT_END){if(e.options.swipe_max_touches>0&&t.touches.length>e.options.swipe_max_touches)return;(t.velocityX>e.options.swipe_velocity||t.velocityY>e.options.swipe_velocity)&&(e.trigger(this.name,t),e.trigger(this.name+t.direction,t))}}},i.gestures.Drag={name:"drag",index:50,defaults:{drag_min_distance:10,drag_max_touches:1,drag_block_horizontal:!1,drag_block_vertical:!1,drag_lock_to_axis:!1,drag_lock_min_distance:25},triggered:!1,handler:function(t,n){if(i.detection.current.name!=this.name&&this.triggered)return n.trigger(this.name+"end",t),this.triggered=!1,e;if(!(n.options.drag_max_touches>0&&t.touches.length>n.options.drag_max_touches))switch(t.eventType){case i.EVENT_START:this.triggered=!1;break;case i.EVENT_MOVE:if(t.distance<n.options.drag_min_distance&&i.detection.current.name!=this.name)return;i.detection.current.name=this.name,(i.detection.current.lastEvent.drag_locked_to_axis||n.options.drag_lock_to_axis&&n.options.drag_lock_min_distance<=t.distance)&&(t.drag_locked_to_axis=!0);var r=i.detection.current.lastEvent.direction;t.drag_locked_to_axis&&r!==t.direction&&(t.direction=i.utils.isVertical(r)?0>t.deltaY?i.DIRECTION_UP:i.DIRECTION_DOWN:0>t.deltaX?i.DIRECTION_LEFT:i.DIRECTION_RIGHT),this.triggered||(n.trigger(this.name+"start",t),this.triggered=!0),n.trigger(this.name,t),n.trigger(this.name+t.direction,t),(n.options.drag_block_vertical&&i.utils.isVertical(t.direction)||n.options.drag_block_horizontal&&!i.utils.isVertical(t.direction))&&t.preventDefault();break;case i.EVENT_END:this.triggered&&n.trigger(this.name+"end",t),this.triggered=!1}}},i.gestures.Transform={name:"transform",index:45,defaults:{transform_min_scale:.01,transform_min_rotation:1,transform_always_block:!1},triggered:!1,handler:function(t,n){if(i.detection.current.name!=this.name&&this.triggered)return n.trigger(this.name+"end",t),this.triggered=!1,e;if(!(2>t.touches.length))switch(n.options.transform_always_block&&t.preventDefault(),t.eventType){case i.EVENT_START:this.triggered=!1;break;case i.EVENT_MOVE:var r=Math.abs(1-t.scale),o=Math.abs(t.rotation);if(n.options.transform_min_scale>r&&n.options.transform_min_rotation>o)return;i.detection.current.name=this.name,this.triggered||(n.trigger(this.name+"start",t),this.triggered=!0),n.trigger(this.name,t),o>n.options.transform_min_rotation&&n.trigger("rotate",t),r>n.options.transform_min_scale&&(n.trigger("pinch",t),n.trigger("pinch"+(1>t.scale?"in":"out"),t));break;case i.EVENT_END:this.triggered&&n.trigger(this.name+"end",t),this.triggered=!1}}},i.gestures.Touch={name:"touch",index:-1/0,defaults:{prevent_default:!1,prevent_mouseevents:!1},handler:function(t,n){return n.options.prevent_mouseevents&&t.pointerType==i.POINTER_MOUSE?(t.stopDetect(),e):(n.options.prevent_default&&t.preventDefault(),t.eventType==i.EVENT_START&&n.trigger(this.name,t),e)}},i.gestures.Release={name:"release",index:1/0,handler:function(t,e){t.eventType==i.EVENT_END&&e.trigger(this.name,t)}},"object"==typeof module&&"object"==typeof module.exports?module.exports=i:(t.Hammer=i,"function"==typeof t.define&&t.define.amd&&t.define("hammer",[],function(){return i}))})(this),function(t,e){"use strict";t!==e&&(Hammer.event.bindDom=function(n,i,r){t(n).on(i,function(t){var n=t.originalEvent||t;n.pageX===e&&(n.pageX=t.pageX,n.pageY=t.pageY),n.target||(n.target=t.target),n.which===e&&(n.which=n.button),n.preventDefault||(n.preventDefault=t.preventDefault),n.stopPropagation||(n.stopPropagation=t.stopPropagation),r.call(this,n)})},Hammer.Instance.prototype.on=function(e,n){return t(this.element).on(e,n)},Hammer.Instance.prototype.off=function(e,n){return t(this.element).off(e,n)},Hammer.Instance.prototype.trigger=function(e,n){var i=t(this.element);return i.has(n.target).length&&(i=t(n.target)),i.trigger({type:e,gesture:n})},t.fn.hammer=function(e){return this.each(function(){var n=t(this),i=n.data("hammer");i?i&&e&&Hammer.utils.extend(i.options,e):n.data("hammer",new Hammer(this,e||{}))})})}(window.jQuery||window.Zepto);

